]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
js: Use DesktopAppInfo from GioUnix
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Sun, 31 Aug 2025 00:55:13 +0000 (02:55 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 13 Sep 2025 17:03:12 +0000 (19:03 +0200)
The type was never part of Gio, but it's an Unix specific type, so use
the platform-specific typelib instead.

This would still work in gjs for 49 but would trigger a warning.

See: https://gitlab.gnome.org/GNOME/glib/-/issues/3744
See: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4761
See: https://gitlab.gnome.org/GNOME/gjs/-/merge_requests/1018
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3855>
(cherry picked from commit 3041605120456166544753396137580a23a055d2)

js/misc/parentalControlsManager.js
js/ui/main.js
js/ui/remoteSearch.js

index cd5353154b506e97cca55a21f8cc516dc7ac143f..55ffed24678f3250516fc7a9b9fd10df6580df22 100644 (file)
@@ -127,7 +127,7 @@ const ParentalControlsManager = GObject.registerClass({
         return this._initialized;
     }
 
-    // Calculate whether the given app (a Gio.DesktopAppInfo) should be shown
+    // Calculate whether the given app (a GioUnix.DesktopAppInfo) should be shown
     // on the desktop, in search results, etc. The app should be shown if:
     //  - The .desktop file doesn’t say it should be hidden.
     //  - The executable from the .desktop file’s Exec line isn’t denied in
index 76b917f48c17df8c3cebbffc33becb81c145e313..383af7cdd512db88dd718701e1ffed057fd97a9d 100644 (file)
@@ -1,5 +1,6 @@
 import Clutter from 'gi://Clutter';
 import Gio from 'gi://Gio';
+import GioUnix from 'gi://GioUnix';
 import GLib from 'gi://GLib';
 import GObject from 'gi://GObject';
 import Meta from 'gi://Meta';
@@ -166,7 +167,7 @@ export async function start() {
 
     let currentDesktop = GLib.getenv('XDG_CURRENT_DESKTOP');
     if (!currentDesktop || !currentDesktop.split(':').includes('GNOME'))
-        Gio.DesktopAppInfo.set_desktop_env('GNOME');
+        GioUnix.DesktopAppInfo.set_desktop_env('GNOME');
 
     sessionMode = new SessionMode.SessionMode();
     sessionMode.connect('updated', _sessionUpdated);
index ae582f194a43c36437b7fba568fa3602045d571b..81bc3861a1830da3d6813689b8f9a7a018ce0598 100644 (file)
@@ -1,5 +1,6 @@
 import GdkPixbuf from 'gi://GdkPixbuf';
 import Gio from 'gi://Gio';
+import GioUnix from 'gi://GioUnix';
 import GLib from 'gi://GLib';
 import Shell from 'gi://Shell';
 import St from 'gi://St';
@@ -96,7 +97,7 @@ export function loadRemoteSearchProviders(searchSettings) {
             let appInfo = null;
             try {
                 let desktopId = keyfile.get_string(group, 'DesktopId');
-                appInfo = Gio.DesktopAppInfo.new(desktopId);
+                appInfo = GioUnix.DesktopAppInfo.new(desktopId);
                 if (!appInfo.should_show())
                     return;
             } catch {